package top.stacktrace.notice.service;

import com.alibaba.fastjson.JSON;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;
import top.stacktrace.notice.domain.Order;

import java.util.function.Consumer;

@Service
public class NoticeService {

    @Bean
    public Consumer<Order> notice(){
        return order -> {
            System.out.println("notice: order " + JSON.toJSONString(order));
        };
    }
}
